﻿using System;
using System.Threading.Tasks;

using Microsoft.AspNetCore.SignalR;
using Microsoft.Extensions.DependencyInjection;


namespace Hcf.Logger.SignalR.Hubs
{
    public class DataHub : Hub
    {
        /// <summary>
        /// 发送日志消息
        /// </summary>
        /// <param name="level"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        public Task SendMessage(string level,string message)
        {
            return Clients.All.SendAsync("ReceiveMessage",level, message);
        }
    }
}
